package com.example.base.entity;

import com.example.base.checker.UniqueStudentCheck;
import org.springframework.stereotype.Component;

import javax.validation.constraints.NotNull;

@Component
public class UserInfo {
    private Integer id;
    @NotNull
    @UniqueStudentCheck
    private String studentNo;
    @NotNull
    private String name;
    @NotNull
    private String gender;

    @Override
    public String toString() {
        return "UserInfo{" +
                "id=" + id +
                ", studentNo='" + studentNo + '\'' +
                ", name='" + name + '\'' +
                ", gender=" + gender +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getStudentNo() {
        return studentNo;
    }

    public void setStudentNo(String studentNo) {
        this.studentNo = studentNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }
}
